From: Stephen Berman Date: Sat, 12 Apr 2025 10:01:50 +0000 (+0200) Subject: Fix display of keys in 'help-form' buffers (bug#77118) X-Git-Tag: archive/raspbian/1%30.2+1-2+rpi1^2~2^2~24^2~148 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=d3c39fb522df50e460940bac10ff489564211d0a;p=emacs.git Fix display of keys in 'help-form' buffers (bug#77118) * lisp/help.el (help-form-show): Use 'insert' instead of 'princ' so that keys in 'help-form' are displayed with 'help-key-binding' face. --- diff --git a/lisp/help.el b/lisp/help.el index 1d87c2209c8..a06679b31f5 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -2262,8 +2262,13 @@ The `temp-buffer-window-setup-hook' hook is called." "Display the output of a non-nil `help-form'." (let ((msg (eval help-form t))) (if (stringp msg) - (with-output-to-temp-buffer " *Char Help*" - (princ msg))))) + (let ((bufname " *Char Help*")) + (with-output-to-temp-buffer bufname) + ;; Use `insert' instead of `princ' so that keys in `help-form' + ;; are displayed with `help-key-binding' face (bug#77118). + (with-current-buffer bufname + (let (buffer-read-only) + (insert msg))))))) (defun help--append-keystrokes-help (str) (let* ((keys (this-single-command-keys))